package com.yuyou.fn.electronicinvoice.service;

import com.github.wens.framework.service.ISuperService;
import com.github.wens.mybatisplus.plugins.Page;
import com.yuyou.fn.electronicinvoice.entity.Invoice;
import com.yuyou.fn.electronicinvoice.vo.InvoiceSaveVo;
import com.yuyou.fn.electronicinvoice.vo.StudentClassInvoiceVo;
import com.yuyou.fn.electronicinvoice.vo.StudentInvoiceQueryVo;
import org.apache.poi.xssf.streaming.SXSSFWorkbook;

import java.rmi.RemoteException;
import java.util.List;

/**
 *
 * Invoice 表数据服务层接口
 *
 */
public interface IInvoiceService extends ISuperService<Invoice,Long> {

    Page<StudentClassInvoiceVo> findStudentClassInvoicePage(StudentInvoiceQueryVo studentInvoiceQueryVo,int pageNo,int pageSize);

    SXSSFWorkbook exportStudentClassInvoice(StudentInvoiceQueryVo studentInvoiceQueryVo);

    List<Invoice> findInvoiceByOrderId(long regId);

    List<Invoice> findByOrderIdsGoodTypeInvoiceTypeStatus(List<Long> orderIds, int goodType,int invoiceType,int status) ;

    Invoice openRegInvoice(Long regId,Integer invoiceType);

    Invoice openOrderInvoice(long courseOrderId,Integer invoiceType);

    InvoiceSaveVo openInvoice(long orderId,Integer invoiceType,String orderType);

    InvoiceSaveVo rushInvoice(long invoiceId);

    Invoice findByOrderIdAndStatus(Long orderId,Integer invoiceType,Integer status);

    void checkHaveOpen(Long orderId,Integer invoiceType,Integer status);


    Invoice saveOrRushInvoice(InvoiceSaveVo invoiceSaveVo) throws org.apache.axis2.AxisFault,RemoteException;


    void dealStudentRefund(Long regId)throws RemoteException;

    void sendInvoiceEmail(Long invoiceId);

    void changeAndSendEmail(InvoiceSaveVo invoiceSaveVo);


}